home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
3032.ZIP
/
RLIB20.ZIP
/
RL_ENCRY.PRG
< prev
next >
Wrap
Text File
|
1989-02-18
|
521b
|
21 lines
* Function: ENCRYPTED
* Author..: Richard Low
* Syntax..: ENCRYPTED( <expC> )
* Returns.: Encrypted version of exp(c)
FUNCTION ENCRYPTED
PARAMETER p_string
PRIVATE f_temp, f_length, f_x
f_temp = ''
f_length = LEN(p_string)
FOR f_x = 1 TO f_length
*-- to encrypt, take character, convert to ASCII value, then
*-- add 101 plus its position in the string to it, then convert
*-- back to a character
f_temp = f_temp + CHR( ASC(SUBSTR(p_string,f_x,1) ) + 101 + f_x)
NEXT
RETURN (f_temp)